package com.henan.caigou.util;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class HtmlParser {
    public List<String> parseBidLinks(String html) {
        List<String> links = new ArrayList<>();
        Document doc = Jsoup.parse(html);
        Elements items = doc.select(".list-item a[href]");

        for (Element item : items) {
            links.add(item.attr("href"));
        }

        return links;
    }

    // 添加更多解析方法...
}